<template>
  <div @click="toggleClick">
    <span class="hamburger"><i class="iconfont" :class="[isActive?'icon-zhankai':'icon-shouqi']" /></span>
  </div>
</template>

<script>
export default {
  name: 'Hamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    toggleClick() {
      this.$emit('toggleClick')
    }
  }
}
</script>

<style scoped lang="scss">
.hamburger {
  display: inline-block;
  padding:5px;
  background-color: rgba(112, 112, 112, .3);
  line-height: 18px;
  vertical-align: middle;
  i{
    font-size: 20px;
    color:#E7F4FF;
    position: relative;
    top: 2px;
  }
}

.hamburger.is-active {
  transform: rotate(180deg);
}
</style>
